package business.customersubsystem;

import java.util.ArrayList;
import java.util.List;
import java.util.HashMap;


import business.exceptions.BusinessException;
import business.exceptions.RuleException;
import business.externalinterfaces.DynamicBean;
import business.externalinterfaces.Address;
import business.externalinterfaces.Rules;
import business.externalinterfaces.RulesSubsystem;
import business.externalinterfaces.RulesConfigKey;
import business.externalinterfaces.RulesConfigProperties;
import business.rulesbeans.AddressBean;
import business.rulesubsystem.RulesSubsystemFacade;

class RulesAddress {//implements Rules {
	private HashMap<String,DynamicBean> table;
	private DynamicBean bean;
	private AddressImpl updatedAddress;
	private RulesConfigProperties config = new RulesConfigProperties();
	
	RulesAddress(Address address){
		bean = new AddressBean(address);
	}	
	

	/* expect a list of address values, in order
	 * street, city, state ,zip
	 */
	public void populateEntities(List<String> updates){
		updatedAddress = new AddressImpl(updates.get(0),
				updates.get(1),
				updates.get(2),
				updates.get(3));
		
	}
	
	public List<AddressImpl> getUpdates() {
		List<AddressImpl> retVal = new ArrayList<AddressImpl>();
		retVal.add(updatedAddress);
		return retVal;
	}
	public void runRules() throws BusinessException, RuleException {
		//implement
	}
	


}
